
#include "heartbeat.h"
#include "worker.h"

void rp_rpointd_heartbeat(int fd, short event, void *arg)
{
	static char fname[] = "rp_rpointd_heartbeat";
	static char msg[] = "fatal error";
	static Err err;
	static State state;

	state = SS_IDLE;
	int i;
	for (i=0; i<config.num_thread_prestart; i++)
	{
		if (rp_rpointd_worker_state(i) == SS_BUSY) state = SS_BUSY;
	}

	err = rp_rpointd_heartbeat_update(global.score, state);
	
	return;
} 

Err rp_rpointd_heartbeat_update(Score *score, State state)
{
	static char fname[] = "rp_rpointd_heartbeat_update";
	static char msg[] = "fatal error";
	static Err err;

	err = rp_mutex_lock(&score->mutex);	
	

	err = rp_mutex_unlock(&score->mutex);
	
	return err;
}
